Skip to content

Conversation

@Avi-Robusta
Copy link
Contributor

No description provided.

@Avi-Robusta Avi-Robusta changed the title [ROB-2347] moved time prompt to improve promt cacheing [ROB-2347]improve prompt cacheing Oct 21, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 21, 2025

Walkthrough

The PR relocates the _current_date_time.jinja2 template includes from the top to the bottom of six prompt template files, adjusting the timing of when current date/time context is injected during template rendering. One file also includes a minor clarifying sentence.

Changes

Cohort / File(s) Change summary
Generic ask templates
holmes/plugins/prompts/generic_ask.jinja2, holmes/plugins/prompts/generic_ask_conversation.jinja2, holmes/plugins/prompts/generic_ask_for_issue_conversation.jinja2
Removed top-of-file inclusion of _current_date_time.jinja2 and re-added it at the end of each template (after main content/examples), changing when current date/time is injected.
Kubernetes workload templates
holmes/plugins/prompts/kubernetes_workload_ask.jinja2, holmes/plugins/prompts/kubernetes_workload_chat.jinja2
Moved _current_date_time.jinja2 include from near the top to the template end (after relevant blocks). kubernetes_workload_chat.jinja2 also adds a clarifying sentence about question relevance to prior investigation.
Investigation template
holmes/plugins/prompts/generic_investigation.jinja2
_current_date_time.jinja2 include moved from top to the end of the file (after investigation_output_format.jinja2).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Renderer
  participant Template
  note right of Template #f9f9f9: Old flow (include at top)
  Renderer->>Template: render()
  Template->>Template: include _current_date_time (early)
  Template->>Template: render rest of content
  Template-->>Renderer: output (now available throughout)

  rect rgba(200,230,201,0.6)
    note right of Template #e8f5e9: New flow (include moved to end)
    Renderer->>Template: render()
    Template->>Template: render main content (examples, blocks)
    Template->>Template: include _current_date_time (late)
    Template-->>Renderer: output (now appended at end)
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Changes are homogeneous (relocate include lines) with one minor text addition.
  • Check rendering order impact and any templates that rely on now/now_timestamp_seconds earlier in the file.
  • Verify kubernetes_workload_chat.jinja2 sentence for tone/consistency.

Suggested reviewers

  • arikalon1
  • mainred

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning No pull request description was provided by the author. While this is a lenient check intended to pass as long as the description is not off-topic, an empty description fails to demonstrate any connection to the changeset or provide context for the significant refactoring across six template files. Even in a lenient evaluation, some minimal explanation of the changes would be expected. Please add a pull request description that explains the rationale for relocating the _current_date_time.jinja2 includes and how these changes improve prompt caching. This will help reviewers understand the intent and impact of the modifications.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The title "[ROB-2347]improve prompt cacheing" is related to the changeset, which involves relocating the _current_date_time.jinja2 template inclusions from the top to the bottom of six Jinja2 template files. This refactoring appears aligned with the stated objective of improving prompt caching, though the title doesn't explicitly describe the specific technical change (moving includes to the end). The title is relevant and specific enough to understand the general purpose of the pull request without being misleading.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch move-datetime

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c7dc636 and fee0299.

📒 Files selected for processing (1)
  • holmes/plugins/prompts/generic_ask.jinja2 (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • holmes/plugins/prompts/generic_ask.jinja2
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: llm_evals
  • GitHub Check: Pre-commit checks
  • GitHub Check: build

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Contributor

Results of HolmesGPT evals

  • ask_holmes: 34/35 test cases were successful, 0 regressions, 1 setup failures
Test suite Test case Status
ask 01_how_many_pods
ask 02_what_is_wrong_with_pod
ask 04_related_k8s_events
ask 05_image_version
ask 09_crashpod
ask 10_image_pull_backoff
ask 110_k8s_events_image_pull
ask 11_init_containers
ask 13a_pending_node_selector_basic
ask 14_pending_resources
ask 15_failed_readiness_probe
ask 17_oom_kill
ask 19_detect_missing_app_details
ask 20_long_log_file_search
ask 24_misconfigured_pvc
ask 24a_misconfigured_pvc_basic
ask 28_permissions_error 🚧
ask 39_failed_toolset
ask 41_setup_argo
ask 42_dns_issues_steps_new_tools
ask 43_current_datetime_from_prompt
ask 45_fetch_deployment_logs_simple
ask 51_logs_summarize_errors
ask 53_logs_find_term
ask 54_not_truncated_when_getting_pods
ask 59_label_based_counting
ask 60_count_less_than
ask 61_exact_match_counting
ask 63_fetch_error_logs_no_errors
ask 79_configmap_mount_issue
ask 83_secret_not_found
ask 86_configmap_like_but_secret
ask 93_calling_datadog[0]
ask 93_calling_datadog[1]
ask 93_calling_datadog[2]

Legend

  • ✅ the test was successful
  • :minus: the test was skipped
  • ⚠️ the test failed but is known to be flaky or known to fail
  • 🚧 the test had a setup failure (not a code regression)
  • 🔧 the test failed due to mock data issues (not a code regression)
  • 🚫 the test was throttled by API rate limits/overload
  • ❌ the test failed and should be fixed before merging the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants